Optimal. Leaf size=115 \[ \frac {(B (n+2)+i A (2-n)) (c-i c \tan (e+f x))^n \, _2F_1\left (2,n;n+1;\frac {1}{2} (1-i \tan (e+f x))\right )}{16 a^2 f n}+\frac {(-B+i A) (c-i c \tan (e+f x))^n}{4 a^2 f (1+i \tan (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3588, 78, 68} \[ \frac {(B (n+2)+i A (2-n)) (c-i c \tan (e+f x))^n \, _2F_1\left (2,n;n+1;\frac {1}{2} (1-i \tan (e+f x))\right )}{16 a^2 f n}+\frac {(-B+i A) (c-i c \tan (e+f x))^n}{4 a^2 f (1+i \tan (e+f x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 68
Rule 78
Rule 3588
Rubi steps
\begin {align*} \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^n}{(a+i a \tan (e+f x))^2} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {(A+B x) (c-i c x)^{-1+n}}{(a+i a x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(i A-B) (c-i c \tan (e+f x))^n}{4 a^2 f (1+i \tan (e+f x))^2}+\frac {(c (A (2-n)-i B (2+n))) \operatorname {Subst}\left (\int \frac {(c-i c x)^{-1+n}}{(a+i a x)^2} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=\frac {(i A (2-n)+B (2+n)) \, _2F_1\left (2,n;1+n;\frac {1}{2} (1-i \tan (e+f x))\right ) (c-i c \tan (e+f x))^n}{16 a^2 f n}+\frac {(i A-B) (c-i c \tan (e+f x))^n}{4 a^2 f (1+i \tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 102.50, size = 0, normalized size = 0.00 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^n}{(a+i a \tan (e+f x))^2} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.76, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left ({\left (A - i \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, A e^{\left (2 i \, f x + 2 i \, e\right )} + A + i \, B\right )} \left (\frac {2 \, c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{n} e^{\left (-4 i \, f x - 4 i \, e\right )}}{4 \, a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (f x + e\right ) + A\right )} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{n}}{{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 8.17, size = 0, normalized size = 0.00 \[ \int \frac {\left (A +B \tan \left (f x +e \right )\right ) \left (c -i c \tan \left (f x +e \right )\right )^{n}}{\left (a +i a \tan \left (f x +e \right )\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^n}{{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {\int \frac {A \left (- i c \tan {\left (e + f x \right )} + c\right )^{n}}{\tan ^{2}{\left (e + f x \right )} - 2 i \tan {\left (e + f x \right )} - 1}\, dx + \int \frac {B \left (- i c \tan {\left (e + f x \right )} + c\right )^{n} \tan {\left (e + f x \right )}}{\tan ^{2}{\left (e + f x \right )} - 2 i \tan {\left (e + f x \right )} - 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________